﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using AssetAllocationSystem.Models.Interface;

namespace AssetAllocationSystem.Models
{
    public class Allocation : IIdentifier
    {
        public virtual Guid Id { get; set; }

        public virtual Asset Asset { get; set; }

        public virtual Assignee Assignee { get; set; }

        public virtual string AllocationType { get; set; }

        public virtual DateTime? ExpectedReleaseDate { get; set; }

        public virtual DateTime? ActualReleaseDate { get; set; }

        public virtual bool IsAvailable
        {
            get
            {
                if (ActualReleaseDate >= DateTime.Now)
                    return false;
                else
                    return true;
            }
        }
    }
}